Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, this is Prasoona Ganaparthi, a student at George Mason University. While exploring open-source projects, I came across yours and found it incredibly interesting. I noticed an issue that was posted on GitHub and decided to work on it. After setting up the environment on my system, I worked on resolving the issue and would love your feedback on my approach.
This pull request fixes the issue where the detail command doesn't automatically start the server if not already. With this update, the server will automatically start if it is not running when executing any detail subcommand (workflow, process, host, or get_process_code).
Code Changes:
Added ensure_server_running Function:
Ensures the Geoweaver server is running before executing a detail command.
Starts the server based on the user's operating system (Windows, macOS, or Linux).
Includes parameters for forced server restart or forced jar download (force_restart and force_download).
Integrated ensure_server_running Across detail Subcommands:
detail_workflow, detail_process, detail_host, and get_process_code now call ensure_server_running before proceeding
with their logic.
Testing Results:
Tested the changes in the local environment on macOS. Below are some test commands and their outputs:
Stop server and list processes:
gw stop
gw list process
Output: Successfully stopped Geoweaver and listed processes without issues.
Start server automatically via detail command:
gw detail code z56pry
Output: Successfully started Geoweaver server and displayed the process details.
Get host details via detail command:
gw detail host 100001
Output: Server started automatically, and host details were retrieved successfully.
Request for Testing:
Please test the following scenarios:
Looking forward to contribute more this project.